<?php
/**
 * 单元测试注解的回调处理
*/

namespace houze\lifecycle;

class testcase_callback
{
    /**
     * 接受回调处理
    */
    public function run($tips) {

        $type = \houze\Config::get('server.houze_service_type');
        // HTTP请求
        if ($type == 'http') {
            $obj = new \houze\controller\Http();
            $obj->fetch($tips);
        // websocket请求
        } else if($type == 'websocket') {
            $obj = new \houze\controller\WebSocket();
            $obj->fetch('route_error', 'error', $tips);
        }
        return true;
    }
}